import request from './request.js'

/**
 * 获取活动详情
 * @param params
 */
export function GetDetail (params) {
  return request({
    url: 'crmMarketing/queryMarketingId',
    method: 'post',
    // data: {
    //   currentUserId:
    // 'MTQ4MTE2NjkxMDU5NzE3NzM0NA==',
    //   device:
    // 'QRque2zkchNinD3G0Ya1748485870482',
    //   marketingId:
    // 'MTkyODMzMTgzNDgzODAyNDE5Mg=='
    // },
    data: params,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 获取字段列表
 * @param params
 */
export function GetField (params) {
  return request({
    url: 'crmMarketing/queryAddField',
    method: 'post',
    data: params
    // data: {
    //   currentUserId:
    //   'MTQ4MTE2NjkxMDU5NzE3NzM0NA==',
    //   marketingId:
    //   'MTkyODMzMTgzNDgzODAyNDE5Mg=='
    // }
  })
}

/**
 * 保存
 * @param params
 */
export function SaveCustomer (params) {
  return request({
    url: 'crmMarketing/saveMarketingInfo',
    method: 'post',
    data: params
  })
}
/**
 * 验证码
 * @param params
 */
export function SendSms (data) {
  return request({
    url: '/sendSms',
    method: 'post',
    params: data
  })
}

export function uploadApi (data) {
  return request({
    url: '/marketingUpload',
    method: 'post',
    data
  })
}
